package pprz.data_components;

public class Dev2Proto {
	public Device _dev;
	public DevProtocol _devprot;
	public MsgProtocol _dec;


	public Dev2Proto() {	}

	public Dev2Proto(Device dev, DevProtocol devprot, MsgProtocol dec) {
		bind(dev, devprot, dec);
	}
	
	public void bind(Device dev, DevProtocol devprot, MsgProtocol dec) {
		_dec = dec;
		_devprot = devprot;
		_dev = dev;
		// bind devices and protocols
		_devprot.bindDecoder(_dec);
		_dev.addDataEventListener(_devprot);		
	}
}
